<div class="row">
     <div class="col-xs-12 col-xs-12">
          <div class="widget radius-bordered">
              <div class="widget-header bg-blue">
				<i class="widget-icon fa fa-arrow-down"></i>
				<span class="widget-caption">智能锁编辑</span>
				<div class="widget-buttons">
					<a href="#" data-toggle="maximize">
						<i class="fa fa-expand"></i>
					</a>
					<a href="#" data-toggle="collapse">
						<i class="fa fa-minus"></i>
					</a>
					<a href="#" data-toggle="dispose">
						<i class="fa fa-times"></i>
					</a>
				</div>
			</div>
              <div class="widget-body">
                   <form id="YstechForm" action="" method="post" class="form-horizontal"
                                                  data-bv-message=""
                                                  data-bv-feedbackicons-valid="glyphicon glyphicon-ok"
                                                  data-bv-feedbackicons-invalid="glyphicon glyphicon-remove"
                                                  data-bv-feedbackicons-validating="glyphicon glyphicon-refresh">
                  <neq name="cache.ID" value=""><input type="hidden" name="ID" value="{$cache.ID}"></neq>
                  <div class="form-title">
                        <a href="{:U('Cms/Locks/goodsList',array('p'=>$p))}" class="btn btn-primary" data-loader="Ystech-loader" data-loadername="智能锁列表">
							<i class="fa fa-mail-reply"></i>返回
						</a>
                   </div>
				   <div class="form-group">
                        <label class="col-lg-2 control-label">序列号<sup>*</sup></label>
                        <div class="col-lg-4">
                        <input type="hidden" name="ID" class="form-control" value="{$cache.ID}">
                        <input type="text" name="SerialNo" class="form-control" value="{$cache.SerialNo}">
                        </div>
                   </div>
				   <div class="form-group">
                        <label class="col-lg-2 control-label">类型<sup>*</sup></label>
                        <div class="col-lg-4">
                        <select name="LockType" class="form-control input-sm"><foreach name="Think.config.LOCKTYPE" item="vo"><option value='{$key}' <eq name='cache.LockType' value='$key'>selected</eq>>{$vo}</option></foreach></select>
                        </div>
                   </div>
                   <div class="form-group">
                        <label class="col-lg-2 control-label">状态</label>
                        <div class="col-lg-4">
                        <select name="Status" class="form-control input-sm"><foreach name="Think.config.LOCKSTATUS" item="vo"><option value='{$key}' <eq name='cache.Status' value='$key'>selected</eq>>{$vo}</option></foreach></select>
                        </div>
                   </div>
                   <div class="form-group">
                        <label class="col-lg-2 control-label">蓝牙芯片mac地址</label>
                        <div class="col-lg-4">
                            
                        <input type="text" name="BluetoothMac" class="form-control" value="{$cache.BluetoothMac}">
                        </div>
                    </div>
                    
                   <div class="form-group">
                        <label class="col-lg-2 control-label">WiFi芯片mac地址</label>
                        <div class="col-lg-4">
                        <input type="text" name="WiFiMac" class="form-control" value="{$cache.WiFiMac}">
                        </div>
                   </div>
				    <div class="form-group">
                        <label class="col-lg-2 control-label">NFC芯片mac地址</label>
                        <div class="col-lg-4">
                        <input type="text" name="NFCMac" class="form-control" value="{$cache.NFCMac}">
                        </div>
                   </div>
				    <div class="form-group">
                        <label class="col-lg-2 control-label">指纹芯片mac地址</label>
                        <div class="col-lg-4">
                        <input type="text" name="FingerprintMac" class="form-control" value="{$cache.FingerprintMac}">
                        </div>
                   </div>
				   <div class="form-group">
                        <label class="col-lg-2 control-label">电池容量</label>
                        <div class="col-lg-4">
                        <input type="text" name="Power" class="form-control" value="{$cache.Power}">
                        </div>
                        <div style="padding-top: 7px;">
                        毫安
                        </div>
                   </div>
                   <div class="form-group">
                        <label class="col-lg-2 control-label">生产日期</label>
                        <div class="col-lg-4">
                        <input type="text" id="CreateDate" name="CreateDate" class="form-control" value="<neq name='cache.CreateDate' value=''>{$cache.CreateDate|strtotime|date='Y-m-d',###}</neq>">
                        </div>
                   </div>
                   <div class="form-group">
                        <label class="col-lg-2 control-label">失效日期</label>
                        <div class="col-lg-4">
                        <input type="text" id="ExpiryDate" name="ExpiryDate" class="form-control" value="<neq name='cache.ExpiryDate' value=''>{$cache.ExpiryDate|strtotime|date='Y-m-d',###}</neq>">
                        </div>
                   </div>
                   <div class="form-group">
                        <label class="col-lg-2 control-label">品牌</label>
                        <div class="col-lg-4">
                        <input name="Brand" type="text" class="form-control" value="{$cache.Brand}">
                        </div>
                   </div>
                   <div class="form-group">
                        <label class="col-lg-2 control-label">工厂信息</label>
                        <div class="col-lg-4">
                        <input name="Company" type="text" class="form-control" value="{$cache.Company}">
                        </div>
                   </div>
                   <div class="form-group">
                        <label class="col-lg-2 control-label">描述</label>
                        <div class="col-lg-4">
                        <textarea class="form-control" name="Memo">{$cache.Memo}</textarea>
                        </div>
                   </div>
                   
					<div class="form-group">
                        <div class="col-lg-offset-2 col-lg-4">
                             <button class="btn btn-primary btn-lg" type="submit">保存</button>&nbsp;&nbsp;&nbsp;&nbsp;
                             <button class="btn btn-palegreen btn-lg" type="reset">重填</button>
                        </div>
                    </div>
                   </form>
                </div>
        </div>
	</div>
     
</div>
<!--面包屑导航封装-->
<div id="tmpbread" style="display: none;">{$breadhtml}</div>
<script type="text/javascript">
	setBread($('#tmpbread').html());
</script>
<!--/面包屑导航封装-->

<!--表单验证与提交封装-->
<script type="text/javascript">

	$('#CreateDate').datepicker({format:"yyyy-mm-dd",autoclose:1});
	$('#ExpiryDate').datepicker({format:"yyyy-mm-dd",autoclose:1});

	$('#YstechForm').bootstrapValidator({
		submitHandler: function (validator, form, submitButton) {
			
			if(!$('input[name="SerialNo"]').val()){
				$.Ystech.alert('danger','请输入序列号！');
				return false;
			}
			
           	var tourl="{:U('Cms/Locks/goods')}";
			var data=$('#YstechForm').serialize();
			$.Ystech.ajax('post',tourl,data,null);
			return false;
        },
	});
	
	
</script>
<!--/表单验证与提交封装-->
